{set:$seller_id = IFilter::act(IReq::get('id'),'int')}
{set:$sellerRow=Api::run('getSellerInfo',$seller_id)}
{if:!$sellerRow}
{set:IError::show(403,'商户信息不存在')}
{/if}
<div class="position"> <span>您当前的位置：</span> <a href="{url:}"> 首页</a> » 商户主页 </div>
<div class="wrapper clearfix container_2">

	<div class="sidebar f_l">
		<div class="box m_10">
			<div class="title">商户信息</div>
			<div class="content">
				<div class="c_box">
					<dl class="clearfix">
						<dt><strong>{$sellerRow['true_name']}</strong></dt>
					</dl>

					<p> 评分：<span class="grade"><i style="width:{echo:Common::gradeWidth(statistics::gradeSeller($sellerRow['id']))}px"></i></span></p>
					<p> 销量：{echo:statistics::sellCountSeller($sellerRow['id'])} 件</p>
					<p> 官网：<a href="{$sellerRow['home_url']}" target="_blank" class="orange">点击进入</a></p>
					<p> 联系电话：{$sellerRow['phone']}</p>
					<p> 所在地：{echo:join(' ',area::name($sellerRow['province'],$sellerRow['city'],$sellerRow['area']))} {$sellerRow['address']}</p>
					{if:$sellerRow['server_num']}
					<p> 商户联系：{set:Sonline::qqShow($sellerRow['server_num'])}</p>
					{/if}
				</div>
			</div>
		</div>

		<div class="box m_10">
			<div class="title">销售排行榜</div>
			<div class="content">
				<ul class="ranklist" id="ranklist">
					{foreach:items=Api::run('getGoodsListBySellerid',array('#seller_id#',$seller_id),10)}
					<li><span>{echo:intval($key+1)}</span><a href="{url:/site/products/id/$item[id]}"><img src="{url:/pic/thumb/img/$item[img]/w/58/h/58}" width="58px" height="58px" /></a><a href="{url:/site/products/id/$item[id]}">{$item['name']}</a><b>￥{$item['sell_price']}</b></li>
					{/foreach}
				</ul>
			</div>
		</div>

		<div class="box m_10">
			<div class="title">商家推荐</div>
			<div class="cont">
				<ul class="ranklist">

					{foreach:items=Api::run('getGoodsListBySelleridList',array('#seller_id#',$seller_id),10)}
					<li class='current'><a href="{url:/site/products/id/$item[id]}"><img src="{url:/pic/thumb/img/$item[img]/w/58/h/58}" width="58" height="58" /></a><a href="{url:/site/products/id/$item[id]}">{$item['name']}</a><b>￥{$item['sell_price']}</b></li>
					{/foreach}
				</ul>
			</div>
		</div>

	</div>

	<div class="main f_r">
		<!--排序-->
		<div id="filter">
		<div class="cls"></div>
		<div class="fore1">
			<dl class="order"><dt>排序：</dt>
				{foreach:items=search_goods::getOrderType()}
					{set:$next = search_goods::getOrderValue($key)}
					<dd class="{echo:search_goods::isOrderCurrent($key) ? 'curr':''} {echo:search_goods::isOrderDesc() ? 'down':'up'}">
					<a href="{echo:search_goods::searchUrl('order',$next)}">{$item}</a><b></b></dd>
				{/foreach}
			</dl>
		</div>
		</div>
		<!--排序-->
	
		
		
		{set:$goodsObj = search_goods::find(array('seller_id' => $seller_id));$resultData = $goodsObj->find();}
		{if:$resultData}
		{set:$listSize = search_goods::getListSize(IFilter::act(IReq::get('show_type')))}
		<ul class="list-h_hl clearfix m_10">
			{foreach:items=$resultData}

			<li index="1" sku="1297041994" selfservice="0">
				<div class="lh-wrap">
					<div class="p-img">
						<a target="_blank" href="{url:/site/products/id/$item[id]}" >
						<img width="220" height="220" alt="{$item['name']}" src="{url:/pic/thumb/img/$item[img]/w/220/h/220}" title="{$item['name']}">
						</a>
					</div>
					<div class="p-name">
						<a target="_blank" href="{url:/site/products/id/$item[id]}"  title="{$item['name']}">
						{$item['name']}
						</a>
					</div>
					<div class="p-price">
						<strong>￥{$item['sell_price']}</strong>
						<del style="float:right">￥{$item['market_price']}</del>
					</div>
					<div class="extra">
						<span class="evaluate"><a target="_blank" href="{url:/site/products/id/$item[id]}">已有{$item['comments']}人评价</a></span>
					</div>
					<div class="btns">
						<a style="width:38%" target="_blank" href="{url:/site/products/id/$item[id]}" class="btn-buy">查看详情</a>
						<a style="width:38%" href="javascript:void(0);" class="btn-buy" onclick="favorite_add_ajax('{url:/simple/favorite_add}','{$item['id']}',this);">收藏</a>
					</div>
				</div>
				</li>

			{/foreach}
		</ul>
		{$goodsObj->getPageBar()}

		{else:}
		<p class="display_list mt_10" style='margin-top:50px;margin-bottom:50px;text-align:center'>
			<strong class="gray f14">对不起，没有找到相关商品</strong>
		</p>
		{/if}
		
		
	</div>
</div>
